/**
 * 公共全局状态
 */

const state = {
  // 全局配置
  global: {
    // 是否全局联动
    isInteractive: false
  },
  // 左半球
  leftViewer: {
    sceneMode: 3
  },
  // 右半球
  rightViewer: {
    sceneMode: 2
  }
}

const mutations = {
  setIsInteractive: (state, isInteractive) => {
    state.global.isInteractive = isInteractive
  },
  setLeftSceneMode: (state, mode) => {
    state.global.leftViewer.sceneMode = mode
  },
  setRightSceneMode: (state, mode) => {
    state.global.rightViewer.sceneMode = mode
  }
}

const actions = {}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
